\(\int (A+B x) (d+e x)^m \sqrt {a^2+2 a b x+b^2 x^2} \, dx\) [1890]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 33, antiderivative size = 171 \[ \int (A+B x) (d+e x)^m \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {(b d-a e) (B d-A e) (d+e x)^{1+m} \sqrt {a^2+2 a b x+b^2 x^2}}{e^3 (1+m) (a+b x)}-\frac {(2 b B d-A b e-a B e) (d+e x)^{2+m} \sqrt {a^2+2 a b x+b^2 x^2}}{e^3 (2+m) (a+b x)}+\frac {b B (d+e x)^{3+m} \sqrt {a^2+2 a b x+b^2 x^2}}{e^3 (3+m) (a+b x)} \]

[Out]

(-a*e+b*d)*(-A*e+B*d)*(e*x+d)^(1+m)*((b*x+a)^2)^(1/2)/e^3/(1+m)/(b*x+a)-(-A*b*e-B*a*e+2*B*b*d)*(e*x+d)^(2+m)*(
(b*x+a)^2)^(1/2)/e^3/(2+m)/(b*x+a)+b*B*(e*x+d)^(3+m)*((b*x+a)^2)^(1/2)/e^3/(3+m)/(b*x+a)

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {784, 78} \[ \int (A+B x) (d+e x)^m \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {\sqrt {a^2+2 a b x+b^2 x^2} (b d-a e) (B d-A e) (d+e x)^{m+1}}{e^3 (m+1) (a+b x)}-\frac {\sqrt {a^2+2 a b x+b^2 x^2} (d+e x)^{m+2} (-a B e-A b e+2 b B d)}{e^3 (m+2) (a+b x)}+\frac {b B \sqrt {a^2+2 a b x+b^2 x^2} (d+e x)^{m+3}}{e^3 (m+3) (a+b x)} \]

[In]

Int[(A + B*x)*(d + e*x)^m*Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

((b*d - a*e)*(B*d - A*e)*(d + e*x)^(1 + m)*Sqrt[a^2 + 2*a*b*x + b^2*x^2])/(e^3*(1 + m)*(a + b*x)) - ((2*b*B*d
- A*b*e - a*B*e)*(d + e*x)^(2 + m)*Sqrt[a^2 + 2*a*b*x + b^2*x^2])/(e^3*(2 + m)*(a + b*x)) + (b*B*(d + e*x)^(3
+ m)*Sqrt[a^2 + 2*a*b*x + b^2*x^2])/(e^3*(3 + m)*(a + b*x))

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 784

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dis
t[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(f + g*x)*(b/2 + c
*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[b^2 - 4*a*c, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {a^2+2 a b x+b^2 x^2} \int \left (a b+b^2 x\right ) (A+B x) (d+e x)^m \, dx}{a b+b^2 x} \\ & = \frac {\sqrt {a^2+2 a b x+b^2 x^2} \int \left (-\frac {b (b d-a e) (-B d+A e) (d+e x)^m}{e^2}+\frac {b (-2 b B d+A b e+a B e) (d+e x)^{1+m}}{e^2}+\frac {b^2 B (d+e x)^{2+m}}{e^2}\right ) \, dx}{a b+b^2 x} \\ & = \frac {(b d-a e) (B d-A e) (d+e x)^{1+m} \sqrt {a^2+2 a b x+b^2 x^2}}{e^3 (1+m) (a+b x)}-\frac {(2 b B d-A b e-a B e) (d+e x)^{2+m} \sqrt {a^2+2 a b x+b^2 x^2}}{e^3 (2+m) (a+b x)}+\frac {b B (d+e x)^{3+m} \sqrt {a^2+2 a b x+b^2 x^2}}{e^3 (3+m) (a+b x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.71 \[ \int (A+B x) (d+e x)^m \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {\sqrt {(a+b x)^2} (d+e x)^{1+m} \left (a e (3+m) (-B d+A e (2+m)+B e (1+m) x)+b \left (A e (3+m) (-d+e (1+m) x)+B \left (2 d^2-2 d e (1+m) x+e^2 \left (2+3 m+m^2\right ) x^2\right )\right )\right )}{e^3 (1+m) (2+m) (3+m) (a+b x)} \]

[In]

Integrate[(A + B*x)*(d + e*x)^m*Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

(Sqrt[(a + b*x)^2]*(d + e*x)^(1 + m)*(a*e*(3 + m)*(-(B*d) + A*e*(2 + m) + B*e*(1 + m)*x) + b*(A*e*(3 + m)*(-d
+ e*(1 + m)*x) + B*(2*d^2 - 2*d*e*(1 + m)*x + e^2*(2 + 3*m + m^2)*x^2))))/(e^3*(1 + m)*(2 + m)*(3 + m)*(a + b*
x))

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.20

method result size
gosper \(\frac {\left (e x +d \right )^{1+m} \sqrt {\left (b x +a \right )^{2}}\, \left (B b \,e^{2} m^{2} x^{2}+A b \,e^{2} m^{2} x +B a \,e^{2} m^{2} x +3 B b \,e^{2} m \,x^{2}+A a \,e^{2} m^{2}+4 A b \,e^{2} m x +4 B a \,e^{2} m x -2 B b d e m x +2 B b \,e^{2} x^{2}+5 A a \,e^{2} m -A b d e m +3 A b \,e^{2} x -a B d e m +3 B a \,e^{2} x -2 B b d e x +6 A a \,e^{2}-3 A b d e -3 B a d e +2 B b \,d^{2}\right )}{e^{3} \left (b x +a \right ) \left (m^{3}+6 m^{2}+11 m +6\right )}\) \(205\)
risch \(\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (B b \,e^{3} m^{2} x^{3}+A b \,e^{3} m^{2} x^{2}+B a \,e^{3} m^{2} x^{2}+B b d \,e^{2} m^{2} x^{2}+3 B b \,e^{3} m \,x^{3}+A a \,e^{3} m^{2} x +A b d \,e^{2} m^{2} x +4 A b \,e^{3} m \,x^{2}+B a d \,e^{2} m^{2} x +4 B a \,e^{3} m \,x^{2}+B b d \,e^{2} m \,x^{2}+2 x^{3} B b \,e^{3}+A a d \,e^{2} m^{2}+5 A a \,e^{3} m x +3 A b d \,e^{2} m x +3 A b \,e^{3} x^{2}+3 B a d \,e^{2} m x +3 B \,x^{2} a \,e^{3}-2 B b \,d^{2} e m x +5 A a d \,e^{2} m +6 A a \,e^{3} x -A b \,d^{2} e m -B a \,d^{2} e m +6 A a d \,e^{2}-3 A b \,d^{2} e -3 B a \,d^{2} e +2 B b \,d^{3}\right ) \left (e x +d \right )^{m}}{\left (b x +a \right ) \left (2+m \right ) \left (3+m \right ) \left (1+m \right ) e^{3}}\) \(314\)

[In]

int((B*x+A)*(e*x+d)^m*(b^2*x^2+2*a*b*x+a^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/e^3*(e*x+d)^(1+m)/(b*x+a)*((b*x+a)^2)^(1/2)/(m^3+6*m^2+11*m+6)*(B*b*e^2*m^2*x^2+A*b*e^2*m^2*x+B*a*e^2*m^2*x+
3*B*b*e^2*m*x^2+A*a*e^2*m^2+4*A*b*e^2*m*x+4*B*a*e^2*m*x-2*B*b*d*e*m*x+2*B*b*e^2*x^2+5*A*a*e^2*m-A*b*d*e*m+3*A*
b*e^2*x-B*a*d*e*m+3*B*a*e^2*x-2*B*b*d*e*x+6*A*a*e^2-3*A*b*d*e-3*B*a*d*e+2*B*b*d^2)

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 256, normalized size of antiderivative = 1.50 \[ \int (A+B x) (d+e x)^m \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {{\left (A a d e^{2} m^{2} + 2 \, B b d^{3} + 6 \, A a d e^{2} - 3 \, {\left (B a + A b\right )} d^{2} e + {\left (B b e^{3} m^{2} + 3 \, B b e^{3} m + 2 \, B b e^{3}\right )} x^{3} + {\left (3 \, {\left (B a + A b\right )} e^{3} + {\left (B b d e^{2} + {\left (B a + A b\right )} e^{3}\right )} m^{2} + {\left (B b d e^{2} + 4 \, {\left (B a + A b\right )} e^{3}\right )} m\right )} x^{2} + {\left (5 \, A a d e^{2} - {\left (B a + A b\right )} d^{2} e\right )} m + {\left (6 \, A a e^{3} + {\left (A a e^{3} + {\left (B a + A b\right )} d e^{2}\right )} m^{2} - {\left (2 \, B b d^{2} e - 5 \, A a e^{3} - 3 \, {\left (B a + A b\right )} d e^{2}\right )} m\right )} x\right )} {\left (e x + d\right )}^{m}}{e^{3} m^{3} + 6 \, e^{3} m^{2} + 11 \, e^{3} m + 6 \, e^{3}} \]

[In]

integrate((B*x+A)*(e*x+d)^m*(b^2*x^2+2*a*b*x+a^2)^(1/2),x, algorithm="fricas")

[Out]

(A*a*d*e^2*m^2 + 2*B*b*d^3 + 6*A*a*d*e^2 - 3*(B*a + A*b)*d^2*e + (B*b*e^3*m^2 + 3*B*b*e^3*m + 2*B*b*e^3)*x^3 +
 (3*(B*a + A*b)*e^3 + (B*b*d*e^2 + (B*a + A*b)*e^3)*m^2 + (B*b*d*e^2 + 4*(B*a + A*b)*e^3)*m)*x^2 + (5*A*a*d*e^
2 - (B*a + A*b)*d^2*e)*m + (6*A*a*e^3 + (A*a*e^3 + (B*a + A*b)*d*e^2)*m^2 - (2*B*b*d^2*e - 5*A*a*e^3 - 3*(B*a
+ A*b)*d*e^2)*m)*x)*(e*x + d)^m/(e^3*m^3 + 6*e^3*m^2 + 11*e^3*m + 6*e^3)

Sympy [F]

\[ \int (A+B x) (d+e x)^m \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\int \left (A + B x\right ) \left (d + e x\right )^{m} \sqrt {\left (a + b x\right )^{2}}\, dx \]

[In]

integrate((B*x+A)*(e*x+d)**m*(b**2*x**2+2*a*b*x+a**2)**(1/2),x)

[Out]

Integral((A + B*x)*(d + e*x)**m*sqrt((a + b*x)**2), x)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.04 \[ \int (A+B x) (d+e x)^m \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {{\left (b e^{2} {\left (m + 1\right )} x^{2} + a d e {\left (m + 2\right )} - b d^{2} + {\left (a e^{2} {\left (m + 2\right )} + b d e m\right )} x\right )} {\left (e x + d\right )}^{m} A}{{\left (m^{2} + 3 \, m + 2\right )} e^{2}} + \frac {{\left ({\left (m^{2} + 3 \, m + 2\right )} b e^{3} x^{3} - a d^{2} e {\left (m + 3\right )} + 2 \, b d^{3} + {\left ({\left (m^{2} + m\right )} b d e^{2} + {\left (m^{2} + 4 \, m + 3\right )} a e^{3}\right )} x^{2} + {\left ({\left (m^{2} + 3 \, m\right )} a d e^{2} - 2 \, b d^{2} e m\right )} x\right )} {\left (e x + d\right )}^{m} B}{{\left (m^{3} + 6 \, m^{2} + 11 \, m + 6\right )} e^{3}} \]

[In]

integrate((B*x+A)*(e*x+d)^m*(b^2*x^2+2*a*b*x+a^2)^(1/2),x, algorithm="maxima")

[Out]

(b*e^2*(m + 1)*x^2 + a*d*e*(m + 2) - b*d^2 + (a*e^2*(m + 2) + b*d*e*m)*x)*(e*x + d)^m*A/((m^2 + 3*m + 2)*e^2)
+ ((m^2 + 3*m + 2)*b*e^3*x^3 - a*d^2*e*(m + 3) + 2*b*d^3 + ((m^2 + m)*b*d*e^2 + (m^2 + 4*m + 3)*a*e^3)*x^2 + (
(m^2 + 3*m)*a*d*e^2 - 2*b*d^2*e*m)*x)*(e*x + d)^m*B/((m^3 + 6*m^2 + 11*m + 6)*e^3)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 652 vs. \(2 (138) = 276\).

Time = 0.30 (sec) , antiderivative size = 652, normalized size of antiderivative = 3.81 \[ \int (A+B x) (d+e x)^m \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {{\left (e x + d\right )}^{m} B b e^{3} m^{2} x^{3} \mathrm {sgn}\left (b x + a\right ) + {\left (e x + d\right )}^{m} B b d e^{2} m^{2} x^{2} \mathrm {sgn}\left (b x + a\right ) + {\left (e x + d\right )}^{m} B a e^{3} m^{2} x^{2} \mathrm {sgn}\left (b x + a\right ) + {\left (e x + d\right )}^{m} A b e^{3} m^{2} x^{2} \mathrm {sgn}\left (b x + a\right ) + 3 \, {\left (e x + d\right )}^{m} B b e^{3} m x^{3} \mathrm {sgn}\left (b x + a\right ) + {\left (e x + d\right )}^{m} B a d e^{2} m^{2} x \mathrm {sgn}\left (b x + a\right ) + {\left (e x + d\right )}^{m} A b d e^{2} m^{2} x \mathrm {sgn}\left (b x + a\right ) + {\left (e x + d\right )}^{m} A a e^{3} m^{2} x \mathrm {sgn}\left (b x + a\right ) + {\left (e x + d\right )}^{m} B b d e^{2} m x^{2} \mathrm {sgn}\left (b x + a\right ) + 4 \, {\left (e x + d\right )}^{m} B a e^{3} m x^{2} \mathrm {sgn}\left (b x + a\right ) + 4 \, {\left (e x + d\right )}^{m} A b e^{3} m x^{2} \mathrm {sgn}\left (b x + a\right ) + 2 \, {\left (e x + d\right )}^{m} B b e^{3} x^{3} \mathrm {sgn}\left (b x + a\right ) + {\left (e x + d\right )}^{m} A a d e^{2} m^{2} \mathrm {sgn}\left (b x + a\right ) - 2 \, {\left (e x + d\right )}^{m} B b d^{2} e m x \mathrm {sgn}\left (b x + a\right ) + 3 \, {\left (e x + d\right )}^{m} B a d e^{2} m x \mathrm {sgn}\left (b x + a\right ) + 3 \, {\left (e x + d\right )}^{m} A b d e^{2} m x \mathrm {sgn}\left (b x + a\right ) + 5 \, {\left (e x + d\right )}^{m} A a e^{3} m x \mathrm {sgn}\left (b x + a\right ) + 3 \, {\left (e x + d\right )}^{m} B a e^{3} x^{2} \mathrm {sgn}\left (b x + a\right ) + 3 \, {\left (e x + d\right )}^{m} A b e^{3} x^{2} \mathrm {sgn}\left (b x + a\right ) - {\left (e x + d\right )}^{m} B a d^{2} e m \mathrm {sgn}\left (b x + a\right ) - {\left (e x + d\right )}^{m} A b d^{2} e m \mathrm {sgn}\left (b x + a\right ) + 5 \, {\left (e x + d\right )}^{m} A a d e^{2} m \mathrm {sgn}\left (b x + a\right ) + 6 \, {\left (e x + d\right )}^{m} A a e^{3} x \mathrm {sgn}\left (b x + a\right ) + 2 \, {\left (e x + d\right )}^{m} B b d^{3} \mathrm {sgn}\left (b x + a\right ) - 3 \, {\left (e x + d\right )}^{m} B a d^{2} e \mathrm {sgn}\left (b x + a\right ) - 3 \, {\left (e x + d\right )}^{m} A b d^{2} e \mathrm {sgn}\left (b x + a\right ) + 6 \, {\left (e x + d\right )}^{m} A a d e^{2} \mathrm {sgn}\left (b x + a\right )}{e^{3} m^{3} + 6 \, e^{3} m^{2} + 11 \, e^{3} m + 6 \, e^{3}} \]

[In]

integrate((B*x+A)*(e*x+d)^m*(b^2*x^2+2*a*b*x+a^2)^(1/2),x, algorithm="giac")

[Out]

((e*x + d)^m*B*b*e^3*m^2*x^3*sgn(b*x + a) + (e*x + d)^m*B*b*d*e^2*m^2*x^2*sgn(b*x + a) + (e*x + d)^m*B*a*e^3*m
^2*x^2*sgn(b*x + a) + (e*x + d)^m*A*b*e^3*m^2*x^2*sgn(b*x + a) + 3*(e*x + d)^m*B*b*e^3*m*x^3*sgn(b*x + a) + (e
*x + d)^m*B*a*d*e^2*m^2*x*sgn(b*x + a) + (e*x + d)^m*A*b*d*e^2*m^2*x*sgn(b*x + a) + (e*x + d)^m*A*a*e^3*m^2*x*
sgn(b*x + a) + (e*x + d)^m*B*b*d*e^2*m*x^2*sgn(b*x + a) + 4*(e*x + d)^m*B*a*e^3*m*x^2*sgn(b*x + a) + 4*(e*x +
d)^m*A*b*e^3*m*x^2*sgn(b*x + a) + 2*(e*x + d)^m*B*b*e^3*x^3*sgn(b*x + a) + (e*x + d)^m*A*a*d*e^2*m^2*sgn(b*x +
 a) - 2*(e*x + d)^m*B*b*d^2*e*m*x*sgn(b*x + a) + 3*(e*x + d)^m*B*a*d*e^2*m*x*sgn(b*x + a) + 3*(e*x + d)^m*A*b*
d*e^2*m*x*sgn(b*x + a) + 5*(e*x + d)^m*A*a*e^3*m*x*sgn(b*x + a) + 3*(e*x + d)^m*B*a*e^3*x^2*sgn(b*x + a) + 3*(
e*x + d)^m*A*b*e^3*x^2*sgn(b*x + a) - (e*x + d)^m*B*a*d^2*e*m*sgn(b*x + a) - (e*x + d)^m*A*b*d^2*e*m*sgn(b*x +
 a) + 5*(e*x + d)^m*A*a*d*e^2*m*sgn(b*x + a) + 6*(e*x + d)^m*A*a*e^3*x*sgn(b*x + a) + 2*(e*x + d)^m*B*b*d^3*sg
n(b*x + a) - 3*(e*x + d)^m*B*a*d^2*e*sgn(b*x + a) - 3*(e*x + d)^m*A*b*d^2*e*sgn(b*x + a) + 6*(e*x + d)^m*A*a*d
*e^2*sgn(b*x + a))/(e^3*m^3 + 6*e^3*m^2 + 11*e^3*m + 6*e^3)

Mupad [F(-1)]

Timed out. \[ \int (A+B x) (d+e x)^m \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\int \left (A+B\,x\right )\,{\left (d+e\,x\right )}^m\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2} \,d x \]

[In]

int((A + B*x)*(d + e*x)^m*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2),x)

[Out]

int((A + B*x)*(d + e*x)^m*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2), x)